package cn.edu.hbwe.book.service.user;

import java.sql.SQLException;

import cn.edu.hbwe.book.dao.impl.UserDaoImpl;
import cn.edu.hbwe.book.entity.User;
import cn.edu.hbwe.book.exception.LoginException;

public class UserService {
	public User login(String username, String password){
		UserDaoImpl dao = new UserDaoImpl();
	
			//根据登录时表单输入的用户名和密码，查找用户
			User user = dao.findUserByUsernameAndPassword(username, password);
			return user;
		
		
	}

	public void updateUserInfo(int id, String parameter, String parameter3) {
		
		UserDaoImpl udi=new UserDaoImpl();
		udi.updateUserMessage(id, parameter, parameter3);
	}
}
